<!-- Begin issues/invoice.tpl -->
{opentable}
{titlebar colspan=7 title=$lg->invoice}
<tr class="sectiontableheader" align="center">
	<td width="5%">{$lg->issues}</td>
	<td width="25%">{$lg->short_description}</td>
	<td width="10%">{$lg->task}</td>
	<td width="10%">{$lg->icost}</td>
	<td width="10%">{$lg->tcost}</td>
	<td width="10%">{$lg->fcost}</td>
	<td width="5%">{$lg->view}</td>
	{if $auth} 
	<td width="5%">{$lg->add}</td>
	<td width="5%">{$lg->auto_fact}</td>
	{/if}	
</tr>
{if is_array($t_afact) > 0}
	{foreach from=$t_afact key=iid item=s_afact}
		<tr class="sectiontableentry2" align="center">
			<td >{$s_afact.issueid}</td>
			<td align="left"><a href="?module=issues&action=view&issueid={$s_afact.issueid}&gid={$s_afact.gid}" >{$s_afact.objet}</a></td>
			<td >{$lg->total}</td>
			<td ><a href="?module=issues&action=view&issueid={$s_afact.issueid}&gid={$s_afact.gid}&show_cost=t" >{$s_afact.icost|string_format:"%.2f"}</a></td>
			<td ><a href="?module=issues&action=cost&issueid={$s_afact.issueid}&gid={$s_afact.gid}" >{$s_afact.tcost|string_format:"%.2f"}</a></td>
			<td >{$s_afact.fcost|string_format:"%.2f"}</td>
			<td ><a href="?module=issues&action=invoice&issueid={$s_afact.issueid}" ><img src="{$smarty.env.imgs.view}" alt="view" class="icons" /></a></td>
			{if $auth} 
				<td ><a href="?module=issues&action=invoice&sub=add&issueid={$s_afact.issueid}" ><img src="{$smarty.env.imgs.create}" alt="create" class="icons" /></a></td>
				<td ><a href="?module=issues&action=invoice&sub=auto&issueid={$s_afact.issueid}" ><img src="{$smarty.env.imgs.create}" alt="auto" class="icons" /></a></td>
			{/if}
		</tr>
		{foreach from=$t_is_cost[$iid]  key=ttask item=s_is_cost}
		<tr class="sectiontableentry1" align="center">
			<td colspan = "2"></td>
			<td >{$ttask}</td>
			<td >{$s_is_cost.icost|string_format:"%.2f"}</td>
			<td >{$s_is_cost.tcost|string_format:"%.2f"}</td>
			<td >{$s_is_cost.fcost|string_format:"%.2f"}</td>
			<td  colspan = "2"></td>			
		</tr>		
		{/foreach}
	{/foreach}
{else}
<tr class="data"><td colspan="7">{$lg->no_data}</td></tr>
{/if}
</table>
<!-- End issues/invoice.tpl -->

